<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/20
 * Time: 16:20
 */

$str = 'date20170920';
$r = preg_match('/^date(\d{1,})/',$str,$m);
var_dump($r);
if ($r){
    echo 'yes';
    var_dump($m);
} else {
    echo "no";
    var_dump($m);
}